/*
 * definitions.h
 *
 *  Created on: 04/10/2013
 *      Author: vitor
 */

#ifndef DEFINITIONS_H_
#define DEFINITIONS_H_

#define NUM_REGS 32
#define MEM_SIZE 65536

#define BASE_DATA 0
#define BASE_CODE 0x1000
#define BASE_TELA 0x2000
#define BASE_STACK 65535

#define W_WIDTH 120
#define W_HEIGHT 80

#define SP 31
#define BP 30
#define RV 29

typedef struct _instance {
	int running;
	unsigned int pc;
	unsigned char cmpFlags;
	int reg[NUM_REGS];
	unsigned char mem[MEM_SIZE];
} vmInfo;

typedef struct _instruction {
	unsigned int opcode;
	unsigned int rs;
	unsigned int rt;
	unsigned int rd;
	short imm;
	unsigned int funct;
} instrInfo;

#endif /* DEFINITIONS_H_ */
